const { createWebAPIRequest } = require('../utils/util')

module.exports = class HotCommentProxy {
  static async getComment (limit, offset, id, cookie) {
    const data = {
      offset: offset,
      rid: id,
      limit: limit,
      csrf_token: ''
    }
    const result = await createWebAPIRequest(
      'music.163.com',
      `/weapi/v1/resource/hotcomments/R_SO_4_${id}/?csrf_token=`,
      'POST',
      data,
      cookie
    )
    return result
  }
}